#include "CSingaporeBusListBox.h"
#include "SingaporeBusStructures.h"

#ifndef SINGAPOREBUSDRAWITEMSLD_H_
#define SINGAPOREBUSDRAWITEMSLD_H_

struct CArrivalTimeItem;

class CSingaporeBusDrawItemsLD
	{
private:
	CFont* iPrimaryFont;
	CFont* iSecondaryFont;
	mutable TRgb iSkinTextColor, iSkinHighlightTextColor;
	mutable TBool iValidSkinTextColor, iValidSkinHighlightTextColor;
	mutable CSingaporeBusListBoxItemDrawer* iDrawer;
	mutable TBool iItemIsCurrent;
	mutable TTimeIntervalMicroSeconds iIntervalSincePreviousCurrentItemChange;

public:
	CSingaporeBusDrawItemsLD();
	const CFont* PrimaryFont() const;
	const CFont* SecondaryFont() const;
	const TRgb& SkinTextColor() const;
	const TRgb& SkinHighlightTextColor() const;
	
	void ConstructL();
	
	
	void DrawBusStopItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const TStation* aStation,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawBusServiceItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CArrivalTimeItem* aArrivalTime,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawBusServiceArrivalTimeItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CArrivalTimeItem* aItem,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawBusServiceArrivalTimeWithStationItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CArrivalTimeItem* aItem,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawBusServiceRouteItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CArrivalTimeItem* aItem,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawItineraryLegFromItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CJourneyPlannerOutput::CItinerary::CLeg* aLeg,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawItineraryLegToItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CJourneyPlannerOutput::CItinerary::CLeg* aLeg,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawItineraryLegWalkItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CJourneyPlannerOutput::CItinerary::CLeg* aLeg,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	void DrawItineraryTotalItemL(CSingaporeBusListBoxItemDrawer* aDrawer, const CJourneyPlannerOutput::CItinerary* aItinerary,
			TInt aItemIndex, const TRect& aActualItemRect,
			TBool aItemIsCurrent, TBool aViewIsEmphasized, TBool aViewIsDimmed, 
			TBool aItemIsSelected) const;
	
	
	
	void BeginDrawItemL(
			CSingaporeBusListBoxItemDrawer* aDrawer,
			const TRect& aRect, 
			TBool aItemIsCurrent,
			TRect& aClientRect) const;
	void EndDrawItemL() const;
	void DrawTextL(
			const TRect& aRect, const CFont* aFont,
			const TDesC8& aText, CGraphicsContext::TTextAlign aAlign = CGraphicsContext::ELeft) const;
	void DrawTextL(
			const TRect& aRect, const CFont* aFont,
			const TDesC& aText, CGraphicsContext::TTextAlign aAlign = CGraphicsContext::ELeft) const;
	void DrawDirectionL(
			const TRect& aRect, const CFont* aFont,
			const TCoordinate& aCoord1, const TCoordinate& aCoord2, TInt aAngleFromMagneticNorth) const;
	void DrawServiceNameL(
			const TRect& aRect, const CFont* aFont,
			const TService* aService) const;
	void DrawStationNumberL(
			const TRect& aRect, const CFont* aFont,
			const TStation* aStation) const;
	void DrawStationNicknameL(
			const TRect& aRect, const CFont* aFont,
			const TStation* aStation) const;
	void DrawStationServicesL(
			const TRect& aRect, const CFont* aFont,
			const TStation* aStation) const;
	void DrawStationServices2L(
			const TRect& aRect, const CFont* aFont,
			const TStation* aStation) const;
	void DrawDistanceL(
			const TRect& aRect, const CFont* aFont,
			const TCoordinate& aCoord1, const TCoordinate& aCoord2) const;
	void DrawArrivalTimeL(
			const TRect& aRect, const CFont* aFont,
			const CArrivalTimeItem* aArrivalTime) const;
	void DrawIconL(
			const TRect& aRect,
			TInt aIconIndex) const;
	void DrawBackgroundL(
			const TRect& aRect) const;

	
	~CSingaporeBusDrawItemsLD();

	};


#endif /* SINGAPOREBUSDRAWITEMSLD_H_ */
